﻿@using Home.Site.Models.DataLayer
<div style="display: block; width: 100%; height: 100px; margin: 10px;">
    @using (Html.BeginForm("Search", "Review", FormMethod.Get))
    {  
        <input type="text" style="display: none;" name="type" value="@Html.Encode(ViewData["type"])"/>
        <div class="input-append">
            <input placeholder="Поиск по названию, тегам или автору.." class="span4" name="searchText" id="appendedInputButtons" type="text" maxlength="100">
            <input class="btn" type="submit" value="Найти" />
            <div class="btn-group" style="margin-left: 10px; margin-bottom: 10px;">
                <button class="btn dropdown-toggle" data-toggle="dropdown">
                    Сортировать
            <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li>@Html.ActionLink("По названию", "sort", "review", new { by = SortTypes.Name, type = ViewData["type"], order = ViewData["typeSort"] }, null)</li>
                    <li>@Html.ActionLink("По дате", "sort", "review", new { by = SortTypes.Date, type = ViewData["type"], order = ViewData["typeSort"] }, null)</li>
                    <li>@Html.ActionLink("По автору", "sort", "review", new { by = SortTypes.Author, type = ViewData["type"], order = ViewData["typeSort"] }, null)</li>
                </ul>
            </div>
        </div>
        <p>@Html.Encode(ViewData["qmessage"])</p>
    }
</div>
